Allow build with system-provided libsqlite (dynamically linked) #381
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is mainly for Linux distributions that package bupstash. Linux distributions generally dislike bundled (statically linked) dependencies, both for security reasons and to save users from wasting network traffic and disk space by having dozens of copies of the same library bundled in different binaries.
Notes:
The
modern_sqlite
feature of rusqlite is implicitly enabled by thebundled
feature, so it's not new here. This feature is needed because it enableslibsqlite3-sys/bundled_bindings
which is needed forsrc/fstx2.rs
to build (it doesn't build withbuildtime_bindgen
, dunno why).sqlite has a very stable API and ABI, so it's not necessary to ensure exact version matching. And it's undesirable when linking with system-provided libsqlite, because it would require rebuilding bupstash every time libsqlite is upgraded to a new patch version (e.g. with fixed security bug). However, I kept the assert and disabled it just for builds without bundled sqlite.